<%-- 
    Document   : displayscheduletasks
    Created on : 08/06/2011, 02:14:41 م
    Author     : Mostafa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib  prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@taglib  prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@taglib  prefix="html" uri="http://struts.apache.org/tags-html" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>All Provider's Tasks Page</title>
        <link type="text/css" href="css/table.css"/>
    </head>
    <body>
        <table border="1" class="table">
            <tr>
                <th> Supplier Name </th>
                <th> Schedule  </th>
                <th> Modifier  </th>
                <th>  Start Date </th>
                <th>  Start Time </th>
                <th>  Day </th>
                <th>  Month </th>
                <th>  Enable </th>
                <th>  Running </th>
            </tr>
            <logic:iterate id="task" name="TasksActionForm" property="tasks">
                <tr>
                    <td>
                        <bean:write name="task" property="name"/>
                    </td>
                    <td>  <bean:write name="task" property="schedule"/> </td>
                    <td>  <bean:write name="task" property="modifier"/> </td>
                    <td>
                        <logic:notEqual name="task" property="startDate" value="">
                            <bean:write name="task" property="startDate"/> 
                        </logic:notEqual>
                    </td>
                    <td>
                        <logic:notEqual name="task" property="startTime" value="">
                            <bean:write name="task" property="startTime"/> 
                        </logic:notEqual>
                    </td>
                    <td>  
                        <logic:notEqual name="task" property="day" value="">
                            <bean:write name="task" property="day"/> 
                        </logic:notEqual> 
                    </td>
                    <td>  
                        <logic:notEqual name="task" property="month" value="">
                            <bean:write name="task" property="month"/> 
                        </logic:notEqual> 
                    </td>
                    <td>   
                        <logic:notEqual name="task" property="isenable" value="">
                            <bean:write name="task" property="isenable"/> 
                        </logic:notEqual>
                    </td>
                    <td>   
                        <logic:notEqual name="task" property="isrunning" value="">
                            <bean:write name="task" property="isrunning"/> 
                        </logic:notEqual>
                    </td>
                    
                    <td> 
                        <logic:equal name="task" property="isenable" value="true">
                            <html:link href="stoperations.do?method=disable&taskid=${task.scId}"> Disable </html:link>  
                        </logic:equal>
                         <logic:notEqual name="task" property="isenable" value="true">
                            <html:link href="stoperations.do?method=enable&taskid=${task.scId}"> Enable </html:link>  
                        </logic:notEqual>
                    </td>  
                    <td>
                          <html:link href="stoperations.do?method=start&taskid=${task.scId} "> Start </html:link>  
                    </td>
                    <td>
                          <html:link href="stoperations.do?method=delete&taskid=${task.scId}&name=${task.name}"  > Delete </html:link>  
                    </td>
                     <td>
                          <html:link href="EditProviderTask.do?method=Edit&taskid=${task.scId} "> Edit </html:link>  
                    </td>
                </tr> 
            </logic:iterate>
        </table>
    </body>
</html>
